home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 6
/
FM Towns Free Software Collection 6.iso
/
t_os
/
cutf
/
asm
/
cutf_m.hd6
< prev
next >
Wrap
Text File
|
1993-07-08
|
5KB
|
468 lines
ds_name db 'MOZCF\CUTFM',0
look_me:
call sub_esi
dd 0,0
dw 1,0 ; wind need
dw 649,379,0,50 ; sz_x sz_y off x off y
dw 0,0 ; waku iro meniro
dw 0,0
paint_wd:
SET_P nddak
WD_LEFT
ret
re_paint:
ret
be_called:
call mozidt_d1
KAKU 384,edi
CALL_P nddak
YOMU ax,382
cmp ax,1
jne kaeret
call shoki
jmp pp_stat
kaeret:
mouse_in:
ret
shoki:
YOMU eax,400
call f_name1
mov [edi],eax
YOMU eax,404
call f_name2
mov [edi],eax
YOMU eax,502
call f_size
mov [edi],eax
YOMU eax,506
call c_size
mov [edi],eax
ret
shoki1:
RAM1 edi
mov ecx,250000/4
mov eax,0
cld
rep stosd
ret
pp_stat:
call h_gets ; handle get
jmp f_cutb
h_gets:
call f_name1
mov edx,[edi]
mov al,2
mov ah,3Dh
int 21h
call f_handl
mov [edi],ax
ret
f_cutb:
BOX box_c4,1
call shoki1
call f_offset
mov eax,0
mov [edi],eax
call f_vol
mov [edi],eax
call f_stop
mov [edi],al
call f_read
call f_cut
call f_make
call fn_chk1
call f_write
call f_clos1
pp_s0:
mov ecx,0
pp_s1:
push ecx
call shoki1
call f_move
call f_read
; call fn_chk1
pop ecx
call f_stop
mov al,[edi]
cmp al,1
je frstop
push ecx
call f_cut
call f_make
call fn_chk1
call f_write
call f_clos1
pop ecx
inc ecx
cmp ecx,20
je askcont0
jmp pp_s1
f_move:
mov ecx,0
mov edx,0
call f_offset
mov eax,[edi]
mov dx,ax
shr eax,16
mov cx,ax
mov al,0
mov ah,42h
call f_handl
mov bx,[edi]
int 21h
ret
f_read:
call c_size
mov ecx,[edi]
call f_size
mov eax,[edi]
call f_offset
mov ebx,[edi]
sub eax,ebx
cmp eax,ecx
jg f_read0
mov ecx,eax
call f_vol ; 最終ファイルのsize
mov [edi],eax
call f_stop
mov al,1
mov [edi],al
f_read0:
call f_handl
mov bx,[edi]
RAM1 edx
mov ah,3fh
int 21h
f_kaku:
RAM1 edi
mov esi,edi
call mozi_buf ; 先頭の20文字を表示
add edi,14
mov ecx,5
cld
rep movsd
BOX box_c0,1
MOZI mozi_buf
ret
f_cut:
CALL_P nddoff
YOMU ecx,510
f_cut12:
call f_vol
mov [edi],ecx
call f_offset
mov eax,[edi]
add eax,ecx
mov [edi],eax
ret
f_make:
call f_name2 ; file_nameを代える
mov edx,[edi]
f_make01:
mov al,[edx]
inc edx
cmp al,0
jne f_make01
sub edx,2
mov al,[edx]
cmp al,39h
je f_ma1
inc al
mov [edx],al
f_make0:
call f_name2
mov edx,[edi]
mov al,2
mov ah,3ch
mov ecx,0
int 21h
call f_handl1
mov [edi],ax
ret
f_ma1:
mov al,'0'
mov [edx],al
dec edx
mov al,[edx]
inc al
mov [edx],al
jmp f_make0
f_write:
RAM1 edx ; ディスクに書き込む
call f_vol
mov ecx,[edi]
call f_handl1
mov bx,[edi]
mov al,0
mov ah,40h
int 21h
ret
f_clos:
call f_handl
mov bx,[edi]
mov ah,3Eh
int 21h
ret
f_clos1:
call f_handl1
mov bx,[edi]
mov ah,3Eh
int 21h
ret
frstop:
call f_make
call f_write
call f_clos1
MOZI mozi_stop
jmp matta0
matta0:
call f_clos ; file close
BOX box_c0,1
BOX box_c1,1
BOX box_c2,1
; call fn_chk1
; jmp matu
ret
askcont0:
call mozidt_d2
KAKU 384,edi
CALL_P nddak
YOMU ax,382
cmp ax,2
jne pp_s0
jmp matta0
fn_chk1:
BOX box_f2,1
call f_name2
mov edx,[edi]
call mozi_newf
add edi,14
fn12:
mov al,[edx]
mov [edi],al
inc edx
inc edi
cmp al,0
jne fn12
MOZI mozi_newf
MOZI mozi_hnewf
ret
p_call:
M_P_CALL
p_set:
M_P_SET
;-----------------------------------------------------------
f_handl:
call sub_edi
dw 0
f_handl1:
call sub_edi
dw 0
f_vol:
call sub_edi
dd 0
f_size:
call sub_edi
dd 0
c_size:
call sub_edi
dd 0
f_offset:
call sub_edi
dd 0
f_stop:
call sub_edi
db 0
f_name1:
call sub_edi
dd 0
f_name2:
call sub_edi
dd 0
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
nddak:
call sub_edi
dw ?
db 'DAKUHI2',0
nddoff:
call sub_edi
dw ?
db 'D_OFF',0
box_f2:
call sub_edi
dw 1,500,30,100,345,0,0,15,6,1
box_c0:
call sub_edi
dw 1,250,30,290,245,0,0,0,0,1
box_c4:
call sub_edi
dw 1,200,30,290,195,0,0,0,0,1
box_c1:
call sub_edi
dw 1,500,30,100,295,0,0,0,0,1
box_c2:
call sub_edi
dw 1,500,30,100,345,0,0,0,0,1
mozi_stop:
call sub_edi
dw 1,15,300,200,50,70,1
db '終わりました',0
dw 0,0
mozi_buf:
call sub_edi
dw 1,15,300,250,20,20,1
db 30 dup(0)
mozi_newf:
call sub_edi
dw 1,15,250,350,0,0,1
db 64 dup(0)
dw 0,0
mozi_hnewf:
call sub_edi
dw 1,7,110,350,0,0,1
db '(分割)',0
dw 0,0
mozidt_d:
call sub_edi
db '分割FILEは同じディレクトリ',0
db ' OK 変える ',0
mozidt_d1:
call sub_edi
db ' 分割します',0
db ' OK やめる ',0
mozidt_d2:
call sub_edi
db ' 続けるかい',0
db ' 続けるやめる ',0